package edu.sctu.xialei.May.day20150518two.usage_Of_Array;

/**
 * Created by Administrator on 2015/5/18 0018.
 */
public class CopyArray {

    public int[] copy_int_array (){

        int[] array1_int;
        array1_int = new int[]{1, 2, 3, 4, 5};

        int[] array2_int = new int[5];

//        复制数组
        System.arraycopy(array1_int,0,array2_int,0,5);

        return array2_int;
    }

    public void printing(int[] array){

        for (int i = 0; i < array.length; i++) {

            System.out.println(array[i]);
        }
    }

}
